import request from "@/api/config/request";
import type { ApiResponse } from "./type";

export interface IUserLoginData {
  username: string;
  password: string;
}

export interface ILoginResponseData {
  token: string;
}

export const UserLogin = (
  data: IUserLoginData
): Promise<ApiResponse<ILoginResponseData>> => {
  return request.post("/auth/login", data);
};

//login({ username: "linda", password: "123" });
